package com.test32_网络编程.util;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class KeyboardInputUtil {
    private static final BufferedReader INPUT = new BufferedReader(new InputStreamReader(System.in));

    private KeyboardInputUtil() {
    }

    public static String getString(String prompt) {
        System.out.print(prompt);
        try {
            String value = INPUT.readLine();    // 读取数据内容
            return value;
        } catch (Exception e) {
            return null;
        }
    }
}
